from machine import Pin
import time

button_pin = Pin(0, Pin.IN, Pin.PULL_UP)
led_pin = Pin(6, Pin.OUT)

while True:
    if button_pin.value():
        led_pin.value(1)
    else:
        led_pin.value(0)